/*      All code produced by the American Heritage School Robotics Team,
 *      The Ninjineers (#2383), for the 2013 FRC Season.
 */

package tk.ninjineers2383.y2013.Components;
import edu.wpi.first.wpilibj.Victor;

public class Drivetrain 
{
    final int REVERSE_RIGHT = 1;    //-1 for reverse direction
    final int REVERSE_LEFT = 1;     //-1 for reverse direction
    
    private Victor FR;
    private Victor FL;
    private Victor RR;
    private Victor RL;
    
    public Drivetrain(int FR_chan, int FL_chan, int RR_chan, int RL_chan)
    {
        FR = new Victor(FR_chan);
        FL = new Victor(FL_chan);
        RR = new Victor(RR_chan);
        RL = new Victor(RL_chan);
    }
    
    /**
     * 
     * @param speed 
     */
    public void setRight(double speed)
    {
        FR.set(REVERSE_RIGHT*speed);
        RR.set(REVERSE_RIGHT*speed);
    }
    
    public void setLeft(double speed)
    {
        FL.set(REVERSE_LEFT*speed);
        RL.set(REVERSE_LEFT*speed);
    }
    
    public void strafe(double speed)
    {
        FR.set(speed);
        RL.set(-1*speed);
        
        FL.set(speed);
        RR.set(-1*speed);
    }
}
